/*****************************
* Create Codebook Files
* Replication file for
* Hill, Seth J. and Gregory A. Huber. 2018. ``On The Meaning of Survey Reports of Roll Call `Votes','' American Journal of Political Science.
******************************/

set more off
* Datafile created outside of replication archive

log using Lucidcodebook.smcl, replace smcl

di "The source for these datafiles is data collected on our LUCID survey"
di "See text of paper for complete details and citations"
di "There are two datafiles. The same source data is used to produce both the flat and wide data files"

use RawData/HillHuberLucidLong_withweights.dta, clear

foreach var of varlist * {
	codebook `var', all
	if ("`var'" ~="V1" & "`var'"~="weight") {
		tab `var', missing
	}
}

use RawData/HillHuberLucidWide_withweights.dta, clear

foreach var of varlist * {
	codebook `var', all
	if ("`var'" ~="V1" & "`var'"~="weight") {
		tab `var', missing
	}
}

log close

translate Lucidcodebook.smcl Lucidcodebook.pdf, trans(smcl2pdf) replace
!erase Lucidcodebook.smcl



